/*
    Unplugged: A library for creating plugins.
    Copyright (C) 2011  Daniel Gutson, FuDePAN

    Unplugged is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    Unplugged is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with Unplugged.  If not, see <http://www.gnu.org/licenses/>.

    This is the main framework include file.
*/

#ifndef UNPLUGGED_FRAMEWORK_H
#define UNPLUGGED_FRAMEWORK_H

#include <string>
#include <mili/mili.h>
#include "dlutils.h"

namespace Unplugged
{

class UnpluggedExceptionHierarchy {};

class UnpluggedException : public mili::GenericException<UnpluggedExceptionHierarchy>
{
public:
    UnpluggedException()
        : mili::GenericException<UnpluggedExceptionHierarchy>(dlerror())
    {}
};

class CreationFunctionNotFound : public UnpluggedException {};
class LibraryNotFound : public UnpluggedException {};

template <class PluginClass>
inline PluginClass* load_plugin(const std::string& libraryname);
}

#define FRAMEWORK_INLINE_H
#include "framework_inline.h"
#undef FRAMEWORK_INLINE_H

#endif
